package com.example.demo_one.model

// 定义城市数据类，包含图标资源ID、城市名称和城市简介
data class CityData(val icon: Int, val text: String, var intro: String)

// 基础响应封装类，适用于所有接口返回
data class BaseResponse<T>(
    val code: Int,           // 状态码
    val message: String,     // 响应消息
    val data: T? = null      // 泛型数据体，可为空
)

// 1. 频道相关
data class Channel(
    val id: Int,
    val name: String
)

data class ChannelData(
    val channels: List<Channel>
)

typealias ChannelResponse = BaseResponse<ChannelData>

// 2. 登录相关
data class LoginRequest(
    val username: String,
    val password: String
)

data class UserData(
    val token: String
)

typealias LoginResponse = BaseResponse<UserData>